perm filename EXAMPL[RDG,DBL]4 blob sn#672839 filedate 1982-08-16 generic text, type C, neo UTF8
COMMENT ⊗   VALID 00013 PAGES
C REC  PAGE   DESCRIPTION
C00001 00001
C00003 00002		Example of Analogies taken from THESIS[1,rdg]
C00009 00003	3a. ewe : lamb :: cow : ?
C00018 00004		More examples -- from THESIS[1,rdg] as well
C00025 00005	Consider the metaphor "People are like electronic circuits".
C00027 00006	@BEGIN(Multiple)additional metaphors, from comparison section:	30-Apr-82 RDG
C00030 00007	Consider the fact that "analog" (as opposed to digital) is itself an analog of
C00031 00008		From SCENARIO
C00033 00009		*** Things from here on are from TASKS ***
C00034 00010	Dialogue: EMACS from E
C00037 00011	(Non)Corresponding commands: (E to EMACS)
C00040 00012	Goal - wrt Existing KBs
C00044 00013	II. Design a new KB (and expert system) modelled after existing KB/expert system:
C00045 ENDMK
C⊗;
	Example of Analogies taken from THESIS[1,rdg]

	*-*-*-*-*-*-*-*-*-*-*
1. What is a bachelor bear?
The question is really find some weakened definition for Bachelor 
which a bear could satisfy -- we'll call this predicate B-Bachelor.
The inquiry, then, is a specification for Bachelor, together with
a partial specification for B-Bachelor
(ie that the B-Bachelor predicate is less restrictive that the Bachelor
predicate, and that a bear can be a B-Bachelor.)
We know the following facts
	∀x. Bachelor(x) <=> [(Species x Human) & Male(x) & ¬ Married(x)]
	Defines(Human, Species)   
			-- ie the Human predicate defines a species.
	Defines(Bear, Species)
		Disjoint( Human, Bear )

	∀x. Bachelor(x) => B-Bachelor(x)
	Possible("∃x. (Species x Bear) & B-Bachelor(x)")
		-- Note this does NOT say that there actually are any
			B-Bachelor Bears, only that there is nothing
			inherently contradictory in this concept.
--- and we want this B-Bachelor to be "close" to Bachelor -- ie Male(x) is NOT
enough, even though it does qualify.

Clearly bears cannot be a bachelor, given the definition above.
However it seems clear that the answer is to get rid of the condition that
only Humans can be bachelors.
This amounts to simply removing that (Species x Human) clause from the definition
of B-Bachelor, which is otherwise identical to Bachelor.
One might assume that the answer is
(1)	∀x. B-Bachelor'(x) <=> Male(x) & ¬Married(x)

(As you should gather from that '), we're not done yet --
how can we meaningfully describe marriage, with repect to bear?
(Clearly not that they had an official marriage license...)

(2)	Married(x) <=> ∃y. [(Male x)	& (MarriedTo x y) ∨
			    (Female x)	& (MarriedTo y x)]
So
(3)	¬Married(x) <=> ∀y. [(Male x)	=> ¬(MarriedTo x y) &
			     (Female x)	=> ¬(MarriedTo y x)]

From (1) and (2) it follows that
	∀x. B-Bachelor'(x) <=> (Male x) &  ∀y. ¬(MarriedTo x y)

Now let's consider that MarriedTo relation --
(4)	∀x,y. (MarriedTo x y) <=> [(Species x) = Human & (Species y) = Human &
				   ∀z. (MotherOf z y)  => (FatherOf z y)].
   [yes, this model does NOT discuss divorces, or extra-marital relations...
    note many anthropologists define marriage as a means of assigning paternity...]

Consider what that means:  as no bear are human, they must all be unmarried -- ie
	∀x. (Species x Bear) => ¬Married(x),
and hence all male bears are bachelor!  Clearly this is NOT what we meant!

In fact, there is (well, should be) a heuristic which asserts that every conjunct
must means something -- ie contribute to the restriction of a class.
This rule would imply our definition of MarriedTo must be weakened, to allow
some bears to qualify.

The next step is to examine that definition of MarriedTo.  Perhaps we should
eliminate a single offending conjunct -- here that (Species x) = Human; leaving
the rest in tact.  Unfortunately this doesn't work here.  The pair of rules
	∀z,y. (MotherOf z y) => (Species z) = (Species y)
	∀x,y. (FatherOf x y) => (Species x) = (Species y)
tells us parents must be cospeciates.
Hence the restriction that ... (Species y) = Human  still damns us -- and
prevents any male bear from marriage.
The solution is to eliminate that clause as well, leaving us with
(5)	∀x,y. (B-MarriedTo x y) <=> ∀z. (MotherOf z y)  => (FatherOf z y)

This definition seems reasonable, and can be incorporated into a meaningful
B-Bachelor defintion:
	∀x. B-Bachelor(x) <=> (Male x) &  ∀y. ¬(B-MarriedTo x y)

... and we are done.

Notice this same approach would work for defining a Bachelor woman as well.

3a. ewe : lamb :: cow : ?
	1. bull,	2. calf,	3. bovine,	4. puppy,	5. child
Consider how people go about solving these sort of problems:
Find a sentence which uses both A and B terms ("meaningfully" together),
and then see if C and ONLY of the other terms {1,2,3,4,5} can be substituted in.

An "obvious" such sentence is
	The mother of any lamb is a ewe.
The clearly carries over to
	The mother of any calf is a cow.
Finding the analogy from such a sentence is straight-forward --
the challenge is how to derive such a sentence.

Let's begin by listing what we know about each of the three "analogue"s above:

Ewe
  Species:		Sheep
  Gender:		Female
  Age:			Mature
  MyDefinitionalSlots:	(Species Gender Age)

Lamb
  Species:		Sheep
  Gender:		<Indeterminant>
  Age:			Immature
  MyDefinitionalSlots:	(Species Age)

Cow
  Species:		Bovine
  Gender:		Female
  Age:			Mature
  MyDefinitionalSlots:	(Species Gender Age)

By the simplist of feature matching, we find that
both Ewes and Lambs are Sheep, and that Ewes and Cows are Mature Female (Animals).
Note also that Cow:MyDefinitionalSlots = Ewe:MyDefinitionalSlots.
So a fact about Ewe and Lambs is that

[*]	(Gender y Female) & (Age y Mature) & (Age x ImMature) & 
	(Species x Sheep) & (Species y Sheep)

What to do with this?  Well,we could test is Cow and ? match this -- i.e.
try to substitute Cow and each of the ?ε{1,2,3,4,5} fox x and y respectively,
and see if [*] holds.
Turns out the substitution x/Cow alone fails -- as 
	(Species Cow Bovine) => ¬(Species Cow Sheep)

A straightforward "abstraction" of [*] is obtained by "variabilizing" the
offending Sheep constant above, transforming [*] to

[**]	(Exist s. (Gender y Female) & (Age y Mature) & (Age x ImMature) & 
		(Species x s) & (Species y s))

This turs out to be sufficient - as now we see that Cow and Calf fit nicely
into [**] for y and x, respectively.

[Had that not worked we could have weakened [*] by other means - such as removing
the (Species x Sheep) clause altogether, etc.  This would have been necessary if
Calf was not included in the list.]

Let's now consider the slightly harder problem -- what if that (1)-(5) list had
NOT been given.  Almost any person could still have answered this query. How?
Notice that neither [*] nor [**], it turns out, relied on that list.  We might
then ask what properties were required for the x variable.  Here we see that
x must satisfy

	(Age x ImMature) & (Species x Bovine)

(having substituting Bovine for the bound s variable) -- which in turn forces
x to be Calf, as expected.

Another approach -- what happened to the "mother of" fact.
Given that Ewes and Lambs share (only) Species,
we might ask what else is true of cospeciates:
From our Domain Facts KB, we find the obvious (defining) fact that

	(ParentOf x y) => Species(x) = Species(y)

That's a start.
Given what we know about Ewes and Lambs, can we assert that ParentOf(Lamb, Ewe)?
[Yes, I know this may be confusing class/individual.  I'll clear this up later,
if necessary.]
That is, does that assertion lead to a contradiction?
Nope.
Realize that the other instantion, ParentOf(Ewe, Lamb), does; as

	(Parent x y) => (Mature y)

amoung other things, and Lambs are known to be immature.

<here>

Consider now the (other) definitional facts about Ewes and Lambs - dealing with
age and gender.  Are there any sentences which deal with various of these
relations.  Yes:

	(NewParentOf x y) => (Age y Mature) & (Age x ImMature) & (ParentOf x y)
	(MotherOf x y) => (ParentOf x y) & (Gender y Female)

Notice the assertion

	(NewParentOf Lamb Ewe) & (MotherOf Lamb Ewe)

is consistent (i.e. we haven't proven that it must follow, only that
this assertion does not lead to contradiction.)


Let's now posit that ParentOf(Lamb, Ewe), and check that
this makes sense.
What do we know about ParentOf?

Let's try instantiating x and y to be a Ewe and a Lamb, respectively.
Given the definitional characteristics of these, we see

Well, we know
	ParentOf(x,y) & Female(x) => MotherOf(x,y)

Using facts about PO and MotherOf, ...
show 
NewMotherOf(x,y) & Bovine(x)  => Calf(x) & Cow(y)

[NewMotherOf(x,y) <=> MO(x,y) & Immature(x)]

What maps Ewe to Lamb?  Species remains the same, but Gender and Age (the other
two defining slots) change value.
So we might expect Cow to ? to similarly retain Species, but not either Gender or
Age.  (If fact we should give the proposed analogy a demerit in the case said
property transfer over -- consider
	Ewe:Lamb :: Mother: ?
Child	Boy	Girl	...
-- clearly the answer is Child and NOT Girl -- even though Girl shares Gender
with Mother.)

Consider now Ewe to Cow.  Here Gender and Age match, but Species doesn't.
This suggests Lamb to ? should preserve these two values, but not Species.
What about MyDefinitionalSlots?  As Cow:MDS = Ewe:MDS, perhaps ?:MDS ← Lamb:MDS.
That does follow in this case -- but I'm not convinced it must.

So we get
?
  Species:		Bovine		[from Cow]
  Gender:		<Indeterminant>	[from Lamb]
  Age:			Immature	[from Lamb]
  MyDefinitionalSlots:  (Species Age)	[from Lamb]

This unambiguously points to Lamb, as you and I knew all along.
-----

Now how do we fit this into the analogizer?  And how do we consider the
(a) - (e) responses?
<<HERE>>
---
Now consider permutations -- ie are the second and third "analogue"s interchangable
(as in	ewe : cow :: lamb : ?	)?
Of course.
-----
	More examples -- from THESIS[1,rdg] as well
Realize that ANALOG (as opposed to digital) is itself analogous to the
idea of analog...

What do these all have in common?

In each example a different subset of these was presented:
Case 6 provided an object and a mapping (here connecting the structure of
a group to that of a corresponding ring), and asked for the other object
(here the X' theorem).
The other cases all provided a pair of objects, and required that mapping.
	*-*-*-*-*-*-*-*-*-*-*
2. Why is learning at CalTech like sipping water from a fire hydrant?
#2 again demonstrates the sharing of some common characteristic (here the
	attempt to ingest a small amount of some substance being forced out)
	*-*-*-*-*-*-*-*-*-*-*
	*-*-*-*-*-*-*-*-*-*-*
3b. language : phoneme :: music : ?
	1. interval,	2. pitch,	3. timbre,	4. melody,	5. harmony
#3a asks which of the five terms relates to lamb in the same way cow does to ewe,
#3b has a similar goal, but here the "answer" is not (as) well defined,
	*-*-*-*-*-*-*-*-*-*-*
#4 is rather ambiguous -- see [Hofstadter] for a list of some appropriate
	answers.
4. Who is the first lady of England?
	*-*-*-*-*-*-*-*-*-*-*
5. (Comparing plays) Is Romeo & Julliet more like Hamlet, or Westside Story?
#5 seems a simple comparison.  However it becomes quite clouded when you realize
	one has no a priori basis of comparison -- should it be in terms of
	number of characters (either in the story itself, or in the name
	of the play), total number of murders, author, or ...
	*-*-*-*-*-*-*-*-*-*-*
6. Given a theorem, X, about a certain type of groups, formulate a new theory,
	X', which holds for a "corresponding" type of rings.
#6 is a traditional form of analogy (see [Kling]) which requires the recognition
	that certain properties and relationships carry over isomorphically from
	one field to (a subset of) another.
	*-*-*-*-*-*-*-*-*-*-*
7. How is the America economy like a rubber band?
#7, thrown in to demonstrate people's incredible ability, shows that one can
	pretty readily invent some mapping to explain almost any "How is X like Y"
	question -- in fact, several.
	*-*-*-*-*-*-*-*-*-*-*
<8. Here have one of TomD's examples or representational...>
	*-*-*-*-*-*-*-*-*-*-*

----

However, there seems some other morsel of information, needed to guide
the search in all but the most trivial of cases.
For example, case #3 could be viewed as finding first
how ewe relates to cow, in the context
defined by lamb and the 1 thru 5 list.
(This context will be defined later.)
When this mapping is applied to lamb we derive the answer.
<<<another example>>>

----
Case #1 provided a pair of <equally-named> objects, and asked for the
mapping.
In case #2, we were given a pair of events, and again asked to find the
similarity.
The #3 cases could be solved by finding (for example)
how ewe relates to cow, in the context
defined by lamb and the 1 thru 5 list.
(This context will be defined later.)
This mapping is then applied to lamb to derive the answer.

Case #4 is quite like #3: it is posing
US : first lady :: England : ?,
where this ? is totally unconstrained.
(Note the US was implicit, and this defined the domain to which the
"first lady of" function is applicable.

Case #5 asks to first generate the <King Lear, Hamlet> and
<King Lear, Love's Labor's Lost> mappings, and then compare these using
some metric.

In Case #6 we start with an object, that theorem X, and a mapping,
which takes a group into a ring, and need
to find the corresponding theorem X'.

Finally Case #7 provides two (random) objects and asks how to map from
one to the other.

----
While originally used only to referred to biological plants,
computer scientists have borrowed this term to refer to a data structure
which shares the "branchiness" physical trees possess.

Consider the metaphor "People are like electronic circuits".
How is this represented?

Given many examples of people, and much information about (as well as
examples of) electronic circuits.  

Why this particular example: Richness and robustness.  Many possible
similarities -- some because the same "equations" are at play;
others are just nice coincidences.

Given knowledge about these circuits,
we might expect our internal anatomical systems might be similar - perhaps
in unexpected ways.  Eg: our endocrin system has many loops -- where
some material flows from a source to a "receptor"; this receptor often
responds by sending a different 
@BEGIN(Multiple)additional metaphors, from comparison section:	30-Apr-82 RDG

On hearing that B, B and N went to BBN -- they found it convenient
that the (existant) company already had the right name,
I remembered the famous case of the Shell sort:
"Shell" does not refer to some nuance of the operation,
it is, instead, the name of the fellow who first suggested this approach.

Broken glass metaphor" for initial state of EMYCIN --
delicate, precarious, reaching thru...

Diamonds from coal -- can be extracted, once the rest has been
cleared away.  Even then few and far inbetween; nonetheless worth
extracting.

finding the representation of a spoon and a shovel which demonstrates their
common PTRANSing function.
In the feature space which high-lights functionality,
it is easy to find a partial match of these objects;
whereas if the only facts represented the situation,
there are no obvious correspondence.
@END(Multiple)

-----
Here is an example of reformulation:

As another example,
imagine that musical pieces are each encoded as a sequence of notes,
with their respective durations.
Finding that two pieces share a common key signature requires first deducing
that signature.  
That is, the notes themselves provide enough information
to find this relationship, but first representing the signature makes this
mapping trivial.
(Of course this information, about the signature, may then be further used,
to derive other facts.  
For example, the signature tells whether the mode of the work is major or minor,
which can relate to its emotional content.)
Consider the fact that "analog" (as opposed to digital) is itself an analog of
(yep,) analogue.
	From SCENARIO
(Briefly, one might find classifications like this in almost any other area as well:
consider music recognition/appreciation:
@BEGIN(Example)
Same piece, different instrumentalists/conduction
	[Preserves notes, timing, etc]
Same piece, different arrangement (for other instruments)
	[Preserves contour of notes, timing, etc]
Same composer, same time of life (perhaps different movements in same peice)
	[Preserves ideas, defn of musicalness, etc]
Same composer, different time of life
	[Preserves "style", derived themes, ability, etc]
Same time period (eg baroque, or gregorian)
	[Preserves overall form (eg acceptability), some tonalities etc]
Same tonality (eg western, or oriental -- more local: slavic)
	[Preserves musical function, ...]
@END(Example)

--another dimension - same instruments, ...

-----
Or, within the domain of computer languages
-- consider InterLisp to MacLisp mapping, or to APL (another interpreter)
or to Pascal (reasonably well designed language) or
to Fortran (well, must have some of the same ideas).
	*** Things from here on are from TASKS ***

Given knowledge about SCORE, figure how to use SAIL.
No <ESC> on SAIL - instead minimal prefix is sufficient.
	Also different control characters -- in line editor.
Directories are [prn,prp], not <User>.

EMACS is like E
	But character oriented, not line

TEX is like SCRIBE
	But n-pass each time
	Based on macros, not...

----
Learn E on UNIX, exploiting metaphors from <SAIL>E and <SCORE>EMACS
Dialogue: EMACS from E
{Here, the analogizer, A, knows a lot of E, a bit about editors in general
(basically by "abstracting" from E), and nothing about EMACS.
Its goal is to "learn" EMACS.  This will be done piecemeal, by attempting
to map salient features of E (and hopefully, hence, of editors) onto EMACS.
The expert, U, knows ~everything about both systems.
Then we'll worry about exceptions. (ie during first stage these will be pushed
into the background.)

Eventually, perhaps, we'll infer something re: EMACS from facts about SCORE -
in particular, its relation to SAIL.}
----

U: EMACS is just like E, except EMACS is character, rather than line, oriented.

A: Oh - I know that E is a general purpose full screen editor, running on a large
time sharing system.  Is EMACS all of these as well?

U: Yes.

A: Let me ignore your comment about "character oriented" for the moment.
(Examining E's teaching aide,)
it seems the basic commands for editors include
	moving the cursor,
	finding some string, 
	substituting one string for another,
	saving and
	exiting.
Are these the same for EMACS?

U: Yes.

A: Are there others?

U: Yes - moving the "point", defining and using macros, ...

<<Insert later:
I know that E is line-buffered.  Also, by definition, every line is
a row of characters.  Should I infer that EMACS is "character buffered"?

U: Yes.

A: Buffering is done to facilitate certain operations...
... hence the various commands for moving among lines will be faster in EMACS;
whereas E's commands, which affect but one line, are more rapid.
>>>

---
Analogy: rather than "from here to end of page", really "from here to point".

(Non)Corresponding commands: (E to EMACS)
Next character, line, window, ...
	[Note EMACS NOT paged; and so no NEXT page]
Previous character, line, window, ...
	[As before, EMACS has no PREVIOUS page]
Find, Substitute, [once, every FUTURE occurance, ALL (forward and backward)]
Documentation (much easier in EMACS - in E must already know E)
Teaching mechanism - called ETEACH both times!


EMACS inserts, E overwrites (by default)
	hence EMACS more twiddleable and adaptable to individual user
	[and EMACS from place with different philosophy, at different time]
EMACS can handle MACROS much better than E
EMACS can access several files at once - E can't
E built to handle multi-page files, EMACS is not.
E has a general mechanism for moving stuff around (αA, αC) - EMACS does it
	by (i) deleting and yanking back,
	or (ii) putting it into a buffer, then depositing that buffer.
EMACS - most commands can have 2 numerical parameters, E but 1.
	Default argument is the standard case: for both, usually +1 (eg for PAGE)
		[of course αL is simply 1L, NOT +1L (as that just <CR>)]
E - no backwards search (because of pages.)
EMACS based on 2 points (cursor and point) - E just has cursor.
E saves automatically on leaving a page, EMACS never saves (of course could twiddle
	it to do so automatically.)

Given this:
Mail at SAIL based on E, on SCORE on EMACS.  How similar, and how different?

Get to internals later: EMACS written on TECO, E in crude assembly code.
Goal - wrt Existing KBs

I. Incorporate a new concept, X, into an existing KB.

This can only work for certain types of domain concepts X:
(1) There is some domain concept Y s.t.
  (i) X is like Y
  (ii) much is known about Y
(2) Little is known about X, except
(3) How X is {like	    } Y.
 	     {different from}

The process would essentially involve:
	Finding all facts, F, which deal with Y.  From each such F, create an
analogous F', which deals with X. (I.e. Y:F :: X: F'.)


Examples:
	[Dendral world]
Esters like ketones
	[Molgen world]
EnzymesX like Restriction Enzymes
Expressed Regions (in DNA) like UnExpressed Regions.
Extrons are like Spacers (between-coding-region regions).
	[Chess world]
Rooks are like Bishops.
Rook pawns are like Bishop pawn.
	[Electronics world]
PNP junctions like NPN.
	[VLSI world]
AND gates are like OR gates.
vanNeumann machines like VLSI computers.
	[Computer science]
Recursion is like Iteration.
	[Mathematics]
Partial orderings are like total orderings.
Lattices are like Strict Hierarchies.
Groups are like Fields | Rings | ...

----
From Shortliffe:
	[Medical world]
<Trophic hormones>
Pituitary gland sends TCH to thyroid gland, which responds with T4,
	back to pituitary
Given this, consider how pituitary interacts with Adrenal:
(here it uses ACTH to Adrenal, and ? back)

?H from pituitary to skin. (no feedback)

Note that ?H shares much structure with ACTH (6 of 8-10 amino acids)

---
another use of analogy
for Oncology - visits are arranged horizontally, special medications vertically.
Then consider what next treatment should be, based on this history.
It should be analogous to earlier treatments, in similar situations...

------
Programme - find a few good fields, and X/Y pairs.
Important to be able to test result -- ie a running program (using Y),
and need to use X - together with known rules of X (which can be checked).

II. Design a new KB (and expert system) modelled after existing KB/expert system:

The abstraction here is (a theory of) EMYCIN.

Meningitis : Mycin :: Urinary tract diseases : ?
Meningitis : Mycin :: ?			     : SACON